<div id="entry_<%= @entry.id %>" class="entry">
	<%= render :partial => "entry_header", :locals => { :entry => @entry } %>
	<div class="body"><%= textilize(@entry.body) %></div>
</div>

<%= render :partial => "/comments/index", :locals => { :comments => @entry.comments } if !@entry.comments.empty? %>


<a name="comment_form"></a>
<div id="comment_form_toggle"><%= link_to_function "Add Your Comment", "Element.toggle('comment_form')" %>
<%= link_to_function image_tag("comment_add.png", :align => "absmiddle", :class => "icon"), "Element.toggle('comment_form')" %></div>

<%= error_messages_for :comment %>

<div id="comment_form" style="display: none;">

<% form_for(:comment, :url => comments_path(@entry)) do |f| %>
<div class="data_left">
  <p>
    <b>Title</b><br />
    <%= f.text_field :title %>
  </p>

  <p>
    <b>Your Name</b><br />
    <%= f.text_field :name %>
  </p>

  <p>
    <b>Your Email</b><br />
    <%= f.text_field :email %>
  </p>

  <p>
    <b>Your Url</b><br />
    <%= f.text_field :url %>
  </p>
</div>
<div class="data_right">
	<p>
    <b>Comment</b><br />
    <%= f.text_area :content %>
  </p>
  <p>
    <%= submit_tag "Create" %>
  </p>
</div>
<% end %>
<%= snr %>
</div>

<% if logged_in? %>
<p>
	<%= link_to 'Edit', edit_entry_path(@entry) %> |
	<%= link_to 'Back', entries_path %>
</p>
<% end %>